package lab02.Test04;

/**
 * Created by lenovo on 2017/10/14.
 */
public class Employee {
    //属性
    private String name;
    private int empno;
    private double rate;  //薪水增长额
    private double sal;  //基本薪水





    //方法
    public Employee(String n,int e,double r,double s ){
        this.setName(n);
        this.setEmpno(e);
        this.setRate(r);
        this.setSal(r);
    }

    public double grow(){
        return sal+rate;
    }
    public String toString(){
        return "员工姓名："+this.getName()+"\n"+
                "员工号码："+this.getEmpno()+"\n"+
                "薪水增长额："+this.getRate()+"\n"+
                "基本工资："+this.getSal();
    }


    //函数


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getEmpno() {
        return empno;
    }

    public void setEmpno(int empno) {
        this.empno = empno;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }
}
